.markdown-item {
  padding: 1.5rem;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 100%;
  overflow: hidden;

  h1, h2, h3 {
    margin: 1.2em 0 0.8em;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
  }

  img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem auto;
    display: block;
  }

  pre {
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 6px;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;

    code {
      font-family: 'Fira Code', monospace;
      font-size: 0.9em;
      white-space: pre-wrap;
    }
  }

  code:not(pre code) {
    padding: 0.2em 0.4em;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.9em;
  }

  @media (max-width: 768px) {
    padding: 1rem;
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    
    pre {
      padding: 0.8rem;
      code {
        font-size: 0.85em;
      }
    }
  }
}